package com.ruoyi.client.cloudcc.api;

import com.alibaba.fastjson.JSONObject;
import com.ruoyi.client.cloudcc.bean.CloudCCFormData;
import com.ruoyi.client.cloudcc.bean.QueryParam;
import com.ruoyi.client.cloudcc.bean.BaseEntity;

/**
 * @Description: 表单业务接口
 * @author: 官宇
 * @date: 2020-12-18
 */
public interface FormApiService {

    /**
     * 普通查询
     * @param queryParam
     * @return
     */
    public JSONObject cquery(QueryParam queryParam) throws Exception;

    public JSONObject cqueryWithRoleRight(QueryParam queryParam) throws Exception;

    /**
     * 数据插入
     * @param data
     * @return
     */
    public JSONObject insert(CloudCCFormData data) throws Exception;

    /**
     * 带权限的插入
     * @param data
     * @return
     */
    public JSONObject insertWithRoleRight(CloudCCFormData data) throws Exception;

    /**
     * 普通删除
     * @param objectApiName 对象名
     * @param ids           数据ID
     * @return
     */
    public BaseEntity delete(String objectApiName, String ... ids) throws Exception;

    /**
     * 普通删除
     * @param objectApiName 对象名
     * @param id            数据ID
     * @return
     */
    public BaseEntity delete(String objectApiName,String id) throws Exception;

    /**
     * 带权限的删除
     * @param objectApiName
     * @param ids
     * @return
     */
    public BaseEntity deleteWithRoleRight(String objectApiName,String ... ids) throws Exception;

    /**
     * 带权限的删除
     * @param objectApiName
     * @param id
     * @return
     */
    public BaseEntity deleteWithRoleRight(String objectApiName,String id) throws Exception;
}
